<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:include="admin/common :: commonhead">
    <!--<div th:replace="admin/common :: commonhead"></div>-->
</head>
<head>
    <title>编辑学生信息</title>
    <!--这里写这个页面单独需要的css-->
</head>
<body class="sticky-header">

<section>
    <!--  引入左侧边  -->
    <div th:replace="admin/common :: left"></div>

    <div class="main-content">
        <div th:replace="admin/common :: header-section"></div>
        <!--这里开始写东西-->
        <div class="wrapper">

            <div class="row">
                <section class="panel col-lg-8 col-md-offset-2">
                    <header class="panel-heading">
                        学生详细信息
                    </header>
                    <div class="panel-body">
                        <form class="form-horizontal adminex-form" th:action="@{/admin/student}" method="post">
                            <input type="hidden" name="_method" value="put">
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">学号</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="stuId" th:value="${student.stuId}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">姓名</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="stuName"
                                           th:value="${student.stuName}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">密码</label>
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" name="stuPassword"
                                           th:value="${student.stuPassword}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">邮箱</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="stuEmail"
                                           th:value="${student.stuEmail}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">电话</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="stuPhone"
                                           th:value="${student.stuPhone}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">专业</label>
                                <div class="col-sm-10">
                                    <select name="stuMajor"  class="form-control">
                                        <option th:each="major : ${majors}" th:value="${major.mjName}" th:text="${major.mjName}"
                                                th:selected="${major.mjName == student.stuMajor}"></option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">性别</label>
                                <div class="radios">
                                    <label for="radio-01" class="label_radio col-lg-2 col-sm-2">
                                        <input type="radio" th:checked="${student.stuSex=='男'}" value="男" id="radio-01"
                                               name="stuSex"> 男
                                    </label>
                                    <label for="radio-02" class="label_radio col-lg-2 col-sm-2">
                                        <input type="radio" th:checked="${student.stuSex=='女'}" value="女" id="radio-02"
                                               name="stuSex"> 女
                                    </label>
                                </div>
                            </div>
                            <button type="submit" class="btn btn-lg btn-login btn-block">
                                <i class="fa fa-check">修改</i>
                            </button>
                        </form>
                    </div>
                </section>
            </div>

        </div>
    </div>
</section>

<div th:replace="admin/common :: commonjs"></div>
<!--data table-->
<script type="text/javascript" th:src="@{/js/data-tables/jquery.dataTables.js}"></script>
<script type="text/javascript" th:src="@{/js/data-tables/DT_bootstrap.js}"></script>
<!--script for editable table-->
<script th:src="@{/js/editable-table.js}"></script>

</body>
</html>